﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Animation</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

<body>
<P><A 
href="http://developer.android.com/guide/topics/graphics/view-animation.html"><FONT 
size=5>http://developer.android.com/guide/topics/graphics/view-animation.html</FONT></A><BR><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 13px/16px arial, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">The<SPAN 
class=Apple-converted-space>&nbsp;</SPAN></SPAN><CODE 
style="WORD-SPACING: 0px; FONT: 13px/1em monospace; TEXT-TRANSFORM: none; COLOR: rgb(0,112,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><A 
style="COLOR: rgb(0,102,153)" 
href="http://developer.android.com/reference/android/animation/ValueAnimator.html">ValueAnimator</A></CODE><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 13px/16px arial, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-converted-space>&nbsp;</SPAN>object keeps track of your animation's 
timing, such as how long the animation has been running, and the current value 
of the property that it is animating.<BR><EM><FONT 
color=#800000>ValueAnimator object 
- níu dữ&nbsp;- vết - thời gian của các animation của bạn, như la - the animation sẽ run trong bao lâu, và giá trị 
hiện hành của</FONT></EM>     
  <BR></SPAN><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 13px/16px arial, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><BR><BR></P></SPAN>
<P><IMG alt="" 
src="images/Animation.jpeg"></P>
<P>&nbsp;</P>
<P><STRONG><FONT color=#000080 
size=5>Áp animation cho một components :</FONT>      </STRONG> 
</P>
<P>&nbsp;&nbsp;&nbsp; public void onClick(View v) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT 
color=#0000ff><STRONG>Animation</STRONG></FONT> shake = 
<FONT color=#0000ff><STRONG>AnimationUtils</STRONG></FONT>.<EM><FONT 
color=#008000>loadAnimation</FONT></EM>(this, <FONT color=#800000>R</FONT>.<FONT 
color=#800080>anim</FONT>.<FONT color=#008080>     
tenfile);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
findViewById(R.id.pw).<EM><FONT 
color=#008000><STRONG>startAnimation</STRONG></FONT></EM> 
(shake);<BR>&nbsp;&nbsp;&nbsp; }</FONT> 
</P>
<P><FONT ><FONT face=Courier 
color=#000000>res/anim/tenfile.xml<BR></FONT></FONT><FONT ><FONT 
color=#008080 size=2> 
</P>
<P>&lt;?</FONT><FONT color=#3f7f7f size=2>xml</FONT><FONT size=2> </FONT><FONT 
color=#7f007f size=2>version</FONT><FONT size=2>=</FONT><I><FONT color=#2a00ff 
size=2>"1.0"</I></FONT><FONT size=2> </FONT><FONT color=#7f007f 
size=2>encoding</FONT><FONT size=2>=</FONT><I><FONT color=#2a00ff 
size=2>"utf-8"</I></FONT><FONT color=#008080 size=2>?&gt;<BR><FONT color=#008080 
size=2>&lt;</FONT><FONT color=#3f7f7f size=2>alpha</FONT><FONT color=#000000 
size=2> </FONT><FONT color=#7f007f size=2>xmlns:android</FONT><FONT 
color=#000000 size=2>=</FONT><I><FONT color=#2a00ff size=2><A 
href="http://schemas.android.com/apk/res/android">http://schemas.android.com/apk/res/android</A> 
</I></FONT><FONT color=#7f007f size=2>android:interpolator</FONT><FONT 
size=2>=</FONT><I><FONT color=#2a00ff 
size=2>"@android:anim/accelerate_interpolator" </I></FONT><FONT color=#7f007f 
size=2>android:fromAlpha</FONT><FONT size=2>=</FONT><I><FONT color=#2a00ff 
size=2>"0.0"</I></FONT><FONT size=2> </FONT><FONT color=#7f007f 
size=2>android:toAlpha</FONT><FONT size=2>=</FONT><I><FONT color=#2a00ff 
size=2>"1.0" </I></FONT><FONT color=#7f007f size=2>android:duration</FONT><FONT 
size=2>=</FONT><I><FONT color=#2a00ff size=2>"2000"</I></FONT><FONT size=2> 
</FONT><FONT color=#008080 size=2>/&gt;</FONT></FONT></P>
<P><FONT size=2><FONT color=#008080><FONT color=#008080><FONT 
color=#800000><STRONG><EM>độ trong suốt thay đổi từ 0.0 tới 
1.0 trong vòng 2000 tíc tắc</EM></STRONG>             
</FONT></P>
<P></FONT></FONT></FONT><FONT color=#ff0000><STRONG><EM>&nbsp;&nbsp;&nbsp;&nbsp;</EM></STRONG></FONT><FONT color=#ff0000><STRONG><EM>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 
cellPadding=2 width="100%" border=1>
  
  <TR>
    <TD>&nbsp;<STRONG><EM><FONT color=#ff0000 align="Left" 
      valign="Top" bgcolor="#FFFF00">muốn các animation thực hiến 
      "step by step" thì sao ?&nbsp;&nbsp;</FONT></EM></STRONG></TD>
    <TD>&nbsp;<STRONG><EM><FONT color=#ff0000><FONT >vd: 
      <BR>Chữ&nbsp;mờ dần đi trong vòng 2 giấy rồi rõ dần lên trong vòng 3 
      giấy<BR>Hoặc ảnh to dần to dần , xoay tròn một cái rồi nhỏ dần nhỏ 
      dần</FONT></FONT></EM></STRONG></TD></TR>
  <TR>
    <TD>&nbsp;</TD>
    <TD>&nbsp;</TD></TR></TABLE></EM></STRONG></FONT></FONT></P></body>
</html>
